package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 设备维修工单记录对象 repair_orders
 *
 * @author ruoyi
 * @date 2025-03-19
 */
public class RepairOrders extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 工单唯一编码（规则：REP+年月日+3位序列号）
     */
    private String repairOrderCode;

    /**
     * 关联设备编号
     */
    @Excel(name = "关联设备编号")
    private String deviceId;

    /**
     * 设备完整名称
     */
    @Excel(name = "设备完整名称")
    private String deviceName;

    /**
     * 详细维修措施描述
     */
    @Excel(name = "详细维修措施描述")
    private String repairContent;

    /**
     * 消耗配件清单（JSON格式存储）
     */
    @Excel(name = "消耗配件清单", readConverterExp = "J=SON格式存储")
    private String usedParts;

    /**
     * 实际维修完成时间
     */
    @Excel(name = "实际维修完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date repairTime;

    /**
     * 故障申报人姓名
     */
    @Excel(name = "故障申报人姓名")
    private String reporterName;

    /**
     * 维修人员工号
     */
    @Excel(name = "维修人员工号")
    private String maintainerId;

    /**
     * 维修人员姓名
     */
    @Excel(name = "维修人员姓名")
    private String maintainerName;

    public void setRepairOrderCode(String repairOrderCode) {
        this.repairOrderCode = repairOrderCode;
    }

    public String getRepairOrderCode() {
        return repairOrderCode;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setRepairContent(String repairContent) {
        this.repairContent = repairContent;
    }

    public String getRepairContent() {
        return repairContent;
    }

    public void setUsedParts(String usedParts) {
        this.usedParts = usedParts;
    }

    public String getUsedParts() {
        return usedParts;
    }

    public void setRepairTime(Date repairTime) {
        this.repairTime = repairTime;
    }

    public Date getRepairTime() {
        return repairTime;
    }

    public void setReporterName(String reporterName) {
        this.reporterName = reporterName;
    }

    public String getReporterName() {
        return reporterName;
    }

    public void setMaintainerId(String maintainerId) {
        this.maintainerId = maintainerId;
    }

    public String getMaintainerId() {
        return maintainerId;
    }

    public void setMaintainerName(String maintainerName) {
        this.maintainerName = maintainerName;
    }

    public String getMaintainerName() {
        return maintainerName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("repairOrderCode", getRepairOrderCode())
                .append("deviceId", getDeviceId())
                .append("deviceName", getDeviceName())
                .append("repairContent", getRepairContent())
                .append("usedParts", getUsedParts())
                .append("repairTime", getRepairTime())
                .append("reporterName", getReporterName())
                .append("maintainerId", getMaintainerId())
                .append("maintainerName", getMaintainerName())
                .append("remark", getRemark())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .toString();
    }
}
